package com.ruoyi.system.service.impl;

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.wechat_qrcode.WeChatQRCode;

import java.util.List;

/**
 * @author 何金岳
 * @Description TODO
 * @createTime 2024年04月06日20时08分57秒
 * @since 1.0.0
 */
public class TestApp {

    public static void main(String args[]){
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        Mat m=getMat("F:\\sf2.jpg");
        WeChatQRCode detector = new WeChatQRCode();
        List<String> result2 = detector.detectAndDecode(m);
        for(String s : result2){
            System.out.println(s);
        }
    }
    public static Mat getMat(String sourcePath) {
        return Imgcodecs.imread(sourcePath);
    }

}
